@echo off
:: Start Chroma vector database server (Windows)

set VECTOR_DB_DIR=.\dataset\vector_db\chroma

echo Creating vector database directory...
if not exist "%VECTOR_DB_DIR%" mkdir "%VECTOR_DB_DIR%"

echo Starting Chroma server...
echo   Access URL: http://localhost:8001
echo   Data Path : %VECTOR_DB_DIR%

chroma run --path "%VECTOR_DB_DIR%" --host 0.0.0.0 --port 8001

if %errorlevel% neq 0 (
    echo Error: Failed to start Chroma. Please check:
    echo   1. Is 'chromadb' installed? Run: pip install chromadb
    echo   2. Is port 8001 already in use?
    pause
    exit /b 1
)